//引入服务器
const express = require('express');
const path = require('path')
//引入auth模块
// const auth =require('./wechat/wx/auth_.js')

//引入路由器模块
const router = require('./wechat/router');

//创建APP对象
const app = express();

//配置模板资源目录
app.set('views', './wechat/views');
//配置模板引擎
app.set('view engine', 'ejs');
app.use(express.static(path.join(__dirname,'wechat/media')))
//服务器有效性
// app.use(auth())
app.use(router)

//监听端口
app.listen(8000,() => console.log("服务器启动成功 localhost:8000"))